<?php

namespace app\common\model;

use app\common\library\MemberVo;
use app\common\traits\TimeToStringTrait;
use think\Model;

/**
 * 模型
 */
class PlatformMoneyRecord extends Model
{
    use TimeToStringTrait;

    // 表名
    protected $name = '';
    protected $deleteTime = false;
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;

    // 追加属性
    protected $append = [

    ];

    const TYPE_INCOME = 1; // 收入
    const TYPE_SPEND  = 2;  // 支出

    const DETAIL_TYPE_AGENT_RECHARGE = 1; // 代理商充值
    const DETAIL_TYPE_SHOP_RECHARGE = 2; // 给商家充值
    const DETAIL_TYPE_ORDER_PROFIT = 3; // 订单收益
    const DETAIL_TYPE_AGENT_TX   = 4; // 代理提现

}
